package com.fs.service;

import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @Description 前置过滤服务
 * @Author hyq
 * @Date 2019/11/23 13:49
 */
public interface PreGlobalService {

    /**
     * 前置过滤器进行token 权限，菜单的校验
     * @param exchange
     * @param chain
     * @return
     */
    Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain);

    long printSub(long start);

    void setUserIpAddress(ServerHttpRequest request);
}
